package org.iks.store.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.iks.common.pojo.message.ChatMessage;
import org.iks.common.pojo.message.ChatMessageStoreVo;
import org.iks.store.business.entity.SessionMessageEntity;
import org.iks.store.business.vo.MessageQueryVo;
import org.iks.store.business.vo.message.MessageAnchorQueryVo;
import org.springframework.lang.Nullable;

import java.util.List;

/**
 * Author kzou
 * Date 2024/2/14
 * Description:
 */
public interface SessionMessageService extends IService<SessionMessageEntity> {

    List<ChatMessage> querySessionMessage(MessageQueryVo queryVo, String userAccount);

    @Nullable
    ChatMessage queryLatestMessage(Integer sessionId);

    void saveMessage(ChatMessageStoreVo message);

    int readMessage(String userAccount, Integer messageId);

    ChatMessage queryById(Integer messageId, String currAccount);

    List<ChatMessage> querySessionMessageByAnchor(String userAccount, MessageAnchorQueryVo queryVo);

}
